<template>
	<view class="dmm-container dmm-container-grey">
		<view class="section">
		  <u-cell-group :border="false">
				<u-cell title="我的银行卡" isLink url="/pages/settleCard/index">
					<image slot="icon" src="/static/imgs/icon_bankcard.png" mode=""></image>
				</u-cell>
				<u-cell title="设置支付密码" isLink :url="setPasswordPath">
					<image slot="icon" src="/static/imgs/icon_setPassword.png" mode=""></image>
				</u-cell>
				<u-cell title="个人信息" isLink url="/pages/userInfo/index">
					<image slot="icon" src="/static/imgs/icon_userInfo.png" mode=""></image>
				</u-cell>
				<u-cell title="关于我们" isLink url="/pages/aboutUs/index">
					<image slot="icon" src="/static/imgs/icon_wechat.png" mode=""></image>
				</u-cell>
			</u-cell-group>
		</view>
		
		<u-button type="primary" text="退出登录" @click="logout"></u-button>
	</view>
</template>

<script>
	import {mapState, mapActions} from 'vuex'
	import { logout } from "@/common/utils.js"
	
	export default {
		data() {
			return {
				
			};
		},
		
		computed: {
			...mapState('setPassword', ['hasSetPayPassword']),
			
			setPasswordPath: function () {
				return this.hasSetPayPassword ? '/pages/setPassword/index' : '/pages/setPassword/resetPassword'
			}
		},
		
		methods: {
			...mapActions('setPassword', ['getPasswordStatus']),
			logout
		},
		
		created() {
			// this.getPasswordStatus()
		},
	}
</script>

<style lang="scss">
	.section {
		margin: 0 30rpx 90rpx;
		padding: 0 30rpx;
		border-radius: $uni-border-radius-lg;
		background-color: #fff;
		.u-cell {
			image {
				height: 42rpx;
				width: 42rpx;
				margin-right: 14rpx;
			}
			
			/deep/ .u-cell__body {
				padding: 38rpx 0;
			}
			
			/deep/ text {
				font-size: 28rpx;
			}
		}
	}
	
	.u-button {
		width: 660rpx !important;
	}
</style>
